package model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the etudiant database table.
 * 
 */
@Entity
@NamedQuery(name="Etudiant.findAll", query="SELECT e FROM Etudiant e")
public class Etudiant implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int idEtudiant;

	private int idUtilisateur;

	private String ine;

	//bi-directional many-to-one association to Note
	@OneToMany(mappedBy="etudiant")
	private List<Note> notes;

	//bi-directional many-to-one association to Reponse
	@OneToMany(mappedBy="etudiant")
	private List<Reponse> reponses;

	//bi-directional many-to-one association to Stage
	@OneToMany(mappedBy="etudiant")
	private List<Stage> stages;

	public Etudiant() {
	}

	public int getIdEtudiant() {
		return this.idEtudiant;
	}

	public void setIdEtudiant(int idEtudiant) {
		this.idEtudiant = idEtudiant;
	}

	public int getIdUtilisateur() {
		return this.idUtilisateur;
	}

	public void setIdUtilisateur(int idUtilisateur) {
		this.idUtilisateur = idUtilisateur;
	}

	public String getIne() {
		return this.ine;
	}

	public void setIne(String ine) {
		this.ine = ine;
	}

	public List<Note> getNotes() {
		return this.notes;
	}

	public void setNotes(List<Note> notes) {
		this.notes = notes;
	}

	public Note addNote(Note note) {
		getNotes().add(note);
		note.setEtudiant(this);

		return note;
	}

	public Note removeNote(Note note) {
		getNotes().remove(note);
		note.setEtudiant(null);

		return note;
	}

	public List<Reponse> getReponses() {
		return this.reponses;
	}

	public void setReponses(List<Reponse> reponses) {
		this.reponses = reponses;
	}

	public Reponse addRepons(Reponse repons) {
		getReponses().add(repons);
		repons.setEtudiant(this);

		return repons;
	}

	public Reponse removeRepons(Reponse repons) {
		getReponses().remove(repons);
		repons.setEtudiant(null);

		return repons;
	}

	public List<Stage> getStages() {
		return this.stages;
	}

	public void setStages(List<Stage> stages) {
		this.stages = stages;
	}

	public Stage addStage(Stage stage) {
		getStages().add(stage);
		stage.setEtudiant(this);

		return stage;
	}

	public Stage removeStage(Stage stage) {
		getStages().remove(stage);
		stage.setEtudiant(null);

		return stage;
	}

}